Repository navigation
[Triton/Gluon] Avoid the peeled sparse MLA spill on 64-bit gathers below triton 3.8 - #6042
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The version check incorrectly treats Triton 3.8 prereleases as the fixed 3.8 release.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Updates sparse MLA dispatch to avoid register spilling on Triton versions below 3.8.
Changes:
- Detects the installed Triton version.
- Unpeels short split-K loops for 64-bit gathers on older Triton releases.
| File | Description |
|---|---|
aiter/ops/triton/attention/pa_decode_sparse.py |
Adds version-gated loop selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The triton tests all passed except shard 6. Seem to be a upstream issue. I also see the same error in other PR. |
vgokhale
left a comment
There was a problem hiding this comment.
Why can't you update your triton whl instead? 3.7 is now quite old.
|
Hi @vgokhale, |
|
@1am9trash I'm approving this as an exception. I don't want to make a habit of having to support old Triton. Please update to 3.8. |
|
Hi @vgokhale, |
ROCm/aiter#6042, sgl-project#5967 and sgl-project#6007 are all ancestors of the AITER pin from sgl-project#44379, so the sgl-project#6042 cherry-pick conflicts in pa_decode_sparse.py and fails the AITER step on gfx942/gfx950. The sgl-project#5967 CSV diff and the group32 other=127 sed (whose file no longer exists) are stale for the same reason.
…e commit The previous commit dropped the ROCm/aiter#6042 cherry-pick on the wrong premise that the 2bb549102 pin already contains it. It does not: the pin (Oct 10) predates the sgl-project#6042 merge (Oct 13). The PR-branch commit 042a28918 conflicts because ROCm/aiter#6159 rewrote pa_decode_sparse.py between the old and new pins. The squash-merge commit 57e2c6b42 sits on top of sgl-project#6159 and applies cleanly to the pin, so cherry-pick that instead. It is on main, so the PR-ref fetch is no longer needed. sgl-project#5967 and sgl-project#6007 are in the pin, so their patches stay removed.
The previous commit dropped the ROCm/aiter#6042 cherry-pick on the wrong premise that the 2bb549102 pin already contains it. It does not: the pin (Oct 10) predates the #6042 merge (Oct 13). The PR-branch commit 042a28918 conflicts because ROCm/aiter#6159 rewrote pa_decode_sparse.py between the old and new pins. The squash-merge commit 57e2c6b42 sits on top of #6159 and applies cleanly to the pin, so cherry-pick that instead. It is on main, so the PR-ref fetch is no longer needed. #5967 and #6007 are in the pin, so their patches stay removed.
… commit sgl-project#44534 dropped the sgl-project#6042 cherry-pick on the premise that the 2bb549102 pin already contains it. It does not: the pin (Oct 10) predates the sgl-project#6042 merge (Oct 13). The PR-branch commit 042a28918 conflicts because ROCm/aiter#6159 rewrote pa_decode_sparse.py between the old and new pins. The squash-merge commit 57e2c6b42 sits on top of sgl-project#6159 and applies cleanly to the pin, and it is on main, so the PR-ref fetch is no longer needed.
… commit #44534 dropped the #6042 cherry-pick on the premise that the 2bb549102 pin already contains it. It does not: the pin (Oct 10) predates the #6042 merge (Oct 13). The PR-branch commit 042a28918 conflicts because ROCm/aiter#6159 rewrote pa_decode_sparse.py between the old and new pins. The squash-merge commit 57e2c6b42 sits on top of #6159 and applies cleanly to the pin, and it is on main, so the PR-ref fetch is no longer needed.

Motivation
#5833 runs the sparse MLA decode loop peeled on 64-bit gathers (KV pool > 2 GiB) when split-K leaves each program only a few tiles. That is the right choice on triton 3.8, but on triton 3.7 the peeled kernel spills ~110 VGPRs to scratch.
Technical Details
_TRITON_GE_38check, usingpackaging.versionlike other version checks in aiter.Test Plan
Triton 3.7:
Test Result
Submission Checklist